<template>
  <a-drawer
    :title="title"
    :maskClosable="true"
    :width="drawerWidth"
    placement="right"
    :closable="true"
    @close="handleCancel"
    :visible="visible"
    style="height: 100%"
    :bodyStyle="{ padding: 0 }"
  >
    <template slot="title">
      <div style="width: 100%">
        <span>{{ title }}</span>
      </div>
    </template>

    <iframe
      ref="myIframe"
      id="myFrameId"
      :src="reqUrl"
      width="1160px"
      :height="iframeHeight+'px'"
      frameborder="0"
      style="display:block; border: none"
    >
    </iframe>
  </a-drawer>
</template>

<script>
export default {
  name: 'AuthorizeModal',
  components: {},
  data() {
    return {
      visible: false,
      drawerWidth: 1168,
      title: this.$t('帮助'),
      reqUrl: '',
      iframeHeight: document.documentElement.clientHeight - 55
    }
  },
  created() {},
  methods: {
    show() {
      var hh=window.location.protocol;
      let that = this
      that.reqUrl = hh+'//wiki.leyudm.com/catalogs/?id=1902629199210872832'
      that.iframeHeight = document.documentElement.clientHeight - 55
      that.visible = true
    },
    handleCancel() {
      this.$emit('close')
      this.visible = false
    }
  },
}
</script>